<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串拼接性能</title>
</head>

<body>

</body>

</html>
<script>
    let startTime = new Date().getTime();
    let html = '';
    for (let index = 0; index < 10000; index++) {
        html += '<div style="width:100px; height:2px; border:1px solid blue;"></div>';
    }
    window.document.body.innerHTML = html;
    let endTime = new Date().getTime();
    window.console.log(endTime - startTime);
</script>